<?php

/**
 * PersonaLocalizacion form base class.
 *
 * @method PersonaLocalizacion getObject() Returns the current form's model object
 *
 * @package    sibi-salud
 * @subpackage form
 * @author     SIBI <sibiud@gmail.com>
 */
abstract class BasePersonaLocalizacionForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'         => new sfWidgetFormInputHidden(),
      'persona_id' => new sfWidgetFormPropelChoice(array('model' => 'Persona', 'add_empty' => true)),
      'telefono'   => new sfWidgetFormInputText(),
      'direccion'  => new sfWidgetFormInputText(),
      'updated_at' => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'         => new sfValidatorPropelChoice(array('model' => 'PersonaLocalizacion', 'column' => 'id', 'required' => false)),
      'persona_id' => new sfValidatorPropelChoice(array('model' => 'Persona', 'column' => 'id', 'required' => false)),
      'telefono'   => new sfValidatorString(array('max_length' => 10)),
      'direccion'  => new sfValidatorString(array('max_length' => 45)),
      'updated_at' => new sfValidatorDateTime(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('persona_localizacion[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'PersonaLocalizacion';
  }


}
